<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>用户注册</title>
		<link rel="stylesheet" href="../../../common/css/login/base.css">
		<link rel="stylesheet" href="../../../common/css/login/reg.css">
		<script type="text/javascript" src="../../../common/js/jquery.js"></script>
		<style type="text/css">
			.div_sp {
				text-align: center;
			}
			.error-border{
				color: red;
			}
		</style>
		<script type="text/javascript">
			$(document).ready(function() {
             
               //判断密码是否合法
				$("#regist_password1").on("blur", function() {
					var $this = $(this);
					var pwd = $this.val();
					var checkpwd = /^[a-zA-Z0-9_]{6,18}$/;
					//	     		alert(pwd);
					if(pwd.trim() == "") {
						$(".sp-2").text("密码不能为空").addClass("error-border");
						return false;
					}
					if(!(checkpwd.test(pwd))) {
						$(".sp-2").text("请输入6-18位由字母数字组成的密码").addClass("error-border");
						return false;
					} else {
						$(".sp-2").text("密码合法").removeClass("error-border");
					}
				})

				//判断第二次密码是否一致
				$("#regist_password2").on("blur", function() {
//					alert(123);
					var $this = $(this);
					var suerpwd = $this.val();
					var pwd = $("#regist_password1").val();

					if(suerpwd == pwd) {
						$(".sp-3").text("密码已确认").removeClass("error-border");
						
						document.getElementById("getVCode").removeAttribute("disabled");
					
					} else {
						$(".sp-3").text("请确保两次密码相同").addClass("error-border");
						return false;
					}
				})
				
				
				
			})
		</script>
	</head>

	<body>
		<div id="ajax-hook"></div>
		<div class="wrap">
			<div class="wpn">
				<div class="form-data pos">
					<a href=""><img src="../../../common/img/zjt/findpwd/logo.png" class="head-logo"></a>
					<!--<p class="tel-warn hide"><i class="icon-warn"></i></p>-->
					<form action="/find/update" method="post">
						<div>
							<p class="p-input pos">
								<label for="tel"></label>
								<input type="password" name="pwd" placeholder="输入新密码" id="regist_password1" autocomplete="off">

								<span class="tel-warn tel-err hide"><em></em><i class="icon-warn"></i></span>
							</p>
						</div>
						<div class="div_sp">
							<span class="sp-2"></span>
						</div>

						<div>
							<p class="p-input pos" id="sendcode">
								<label for="veri-code"></label>
								<input type="password" placeholder="确认新密码" id="regist_password2">

								<span class="error hide"><em></em><i class="icon-warn" style="margin-left: 5px"></i></span>
							</p>
						</div>
						<div class="div_sp">
							<span class="sp-3"></span>
						</div>
					
					
					<button class="lang-btn" id="getVCode" disabled="true">马上修改</button>
					</form>
					<div class="bottom-info">突然记得密码了，，
						<a href="/login/index">马上登录</a>
					</div>
					<div class="third-party">
						<a href="" class="log-qq icon-qq-round"></a>
						<a href="" class="log-qq icon-weixin"></a>
						<a href="" class="log-qq icon-sina1"></a>
					</div>
					<p class="right">Weibo password retrievl</p>
				</div>
			</div>
		</div>
		<!--<script src="../../../common/js/findpwd/jquery.js"></script>
    <script src="../../../common/js/findpwd/agree.js"></script>-->

	</body>

</html>